The background description provided herein is for the purpose of generally presenting the context of the disclosure. Unless otherwise indicated herein, the materials described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
In computing, memcached is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in random access memory (RAM) to reduce the number of times an external data source (such as a database) must be read. Most systems use a client-server architecture that includes multiple clients and servers. The servers maintain a key-value associative array; the clients populate this array and query it. Clients use client-side libraries to contact the servers. Each client knows all servers; the servers typically do not communicate with each other. If a client wishes to set or read the value corresponding to a certain key, the client's library first computes a hash of the key to determine the server to use. Then it contacts that server. The server will compute a second hash of the key to determine where to store or read the corresponding value. Typically, the servers keep the values in RAM; if a server runs out of RAM, it discards the oldest values.
For large web applications, e.g., web applications with millions of users, hundred of memcached servers may be necessary to timely service the page requests. To meet business requirements, the service operator not only needs to provide a total memory size as large as possible to meet desired service level agreements (SLA), but also needs a lot of CPU power to handle the memory access requests, which often includes GET, SET, UPDATE, among others.
Due to the CPU limitations, a memcached server typically cannot fully utilize the physical capacity of the implementing memories. Instead, operators need to spread load across multiple memcached servers to achieve expected load balance and thus SLAs. This leads to at least two problems: 1) poor memory bandwidth usage; and 2) poor scalability. Also, due to heavy CPU involvement, overhead for each memory access is high. This leads to poor power efficiency per every Key-Value pair access. Thirdly, access pattern for memcached is usually highly random, that makes CPU caching for data stored in memcached almost useless, but a waste of cycles and power.